import {createElement, Component} from 'rax';
import View from 'rax-view';
import Text from 'rax-text';
import Image from 'rax-image';
import Link from 'rax-link';
import TextInput from 'rax-textinput';
import Button from 'rax-button';
import Switch from 'rax-switch';
import Video from 'rax-video';
import ScrollView from 'rax-scrollview';
import TouchableWithoutFeedback from 'rax-touchable';
import Gotop from 'rax-gotop';

class GotopDemo extends Component {
  render() {
    return (
      <View>
        <Gotop resident={true} bottom={40} onTop={() => {
          this.props.onTop();
        }} />
        <View style={styles.container}>
          <Image style={styles.icon} source={{uri: ''}} />
          <Text>
            Look at the floating icon in the lower right corner of the page
          </Text>
        </View>
      </View>
    );
  }
}

let styles = {
  container: {
    padding: 20,
    borderStyle: 'solid',
    borderColor: '#dddddd',
    borderWidth: 1,
    marginLeft: 20,
    marginRight: 20,
    marginBottom: 10,
  },
  icon: {
    width: 40,
    height: 40,
    marginBottom: 16,
  },
};

export default GotopDemo;
